Skip to content

Conversation

@reosfire
Copy link
Contributor

@reosfire reosfire commented May 8, 2025

When I write this code and count myself how much invocations are triggered per second I found that it is ~36

addFixedUpdater((1 / 30f).seconds) {
    debugOverlay.countTick()
}

That happens because sometimes when accum >= 0.75 * time we subtract time and getting accum < 0 (meaning that we need to wait more next time) But then in the code I'm about to delete we just forgetting that fact.

Maybe better way to fix it is by adding && accum > 0 But I actually don't understand what hiccups mean here. And can't see problems which this code solves.

@soywiz soywiz merged commit 6737670 into korlibs:main May 8, 2025
6 checks passed
@reosfire reosfire deleted the fix-fixed-update branch May 20, 2025 11:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants